import 'package:carousel_slider/carousel_slider.dart';
import 'package:flutter/material.dart';
import 'package:sample2/helper/app_helper.dart';

class ProductDetail extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return ProductDetailState();
  }
}

class ProductDetailState extends State {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("Product Detail"),
      ),
      body: Container(
        color: Colors.yellow,
        child: Card(
          child: Padding(
            padding: EdgeInsets.symmetric(vertical: 0, horizontal: 15),
            child:
                Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
              CarouselSlider(
                  items: [
                    Image(
                        image: NetworkImage(
                            "${AppHelper.shared.getBkDomainName()}/images/2022-12-07T01:26:27.048Z_u=1668716973,532930897&fm=253&fmt=auto&app=138&f=JPEG.webp"))
                  ],
                  options: CarouselOptions(
                      viewportFraction: 1, enlargeCenterPage: true)),
              const ListTile(
                // leading: Text("data"),
                title: Text("A shower"),
                subtitle: Text("lovely product"),
              ),
              const ListTile(
                subtitle: Text(
                  "description description description description description description description description",
                ),
              ),
              TextButton(
                  onPressed: () {}, child: const Text("similar product>>"))
            ]),
          ),
        ),
      ),
    );
  }
}
